package com.andnnl.streamtest1;

/**
 * Created by chenss on 2017/7/18.
 */
public class TimeRecorder {
    private long startTime;
    private long endTime;

    public void start() {
        startTime = System.currentTimeMillis();
    }

    public long end() {
        endTime = System.currentTimeMillis();
        return endTime - startTime;
    }

    public long getDuration() {
        return endTime - startTime;
    }

}